package com.example.sunjian.myapplication.scroller;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.Scroller;
import android.widget.TextView;
import android.widget.Toast;

import com.example.sunjian.myapplication.R;

/**
 * 作者：sunjian on 16/7/19 17:46
 * 邮箱：sunjian@cyhz.com
 */
public class ScrollerActivity extends Activity {

//   private ListView mListView;
//    private String[] str = {"第一条","第二条","第三条","第四条","第五条","第六条","第七条"};

    private ScrollLinear mScrollLin;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.scroll_layout);


        mScrollLin =(ScrollLinear)findViewById(R.id.lin);
        findViewById(R.id.delete).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(ScrollerActivity.this,"删除",Toast.LENGTH_SHORT).show();
            }
        });

//       mListView=(ListView)findViewById(R.id.scroll_list);
//        ArrayAdapter adapter = new ArrayAdapter(this,R.layout.scroll_layout,R.id.txt,str);
//        mListView.setAdapter(adapter);
    }

}
